#include "mission.h"
#include "mission_manager.h"

void mission::upcall_event(mission_event *e)
{
	mission_manager::get_intance()->push_event(this, this->m_parent, e);
}

void mission::free_general(AI9::GeneralType type)
{
	for (gtype_list::iterator it = m_troop.begin(); it != m_troop.end(); )
		if (*it == type)
			it = m_troop.erase(it);
		else
			++it;
	upcall_event(new free_general_event(this, type));
}
